<template>
  <div class="box">
    <div class="flex ">
      <h4 class="flex-grow">产业园招商</h4>
    </div>
    <div class="content py-4">
      <div class="flex">
        <img class="w-1/2 object-cover" :src="attract.file" alt="" />
        <div class="flex flex-col justify-around px-4">
          {{ attract.title || '' }}
        </div>
      </div>
      <p v-html="attract.remark" class="p-4"></p>
    </div>
  </div>
</template>

<script>
import { getCityManager } from '@/api/windowCity/getCityInfo'
export default {
  data() {
    return {
      attract: {},
    }
  },
  created() {
    this.getCityInfo()
  },
  methods: {
    getCityInfo() {
      let id = this.$route.params.id
      getCityManager({ cityId: id }).then((res) => {
        if (res.code === 200) {
          let list = res.rows
          this.manageInfo(list)
        }
      })
    },
    manageInfo(resList) {
      for (let index = 0; index < resList.length; index++) {
        const ele = resList[index]
        if (ele.type === 2) {
          this.attract = ele
        }
      }
    },
  },
}
</script>

<style lang="scss" scoped>
.box {
  border-top: solid 2px #f08519;
  @apply px-4 py-8 border-2  overflow-hidden rounded-md;
}
.content {
  height: 360px;
  line-height: 1.8rem;
  @apply w-full text-gray-500 py-4  overflow-ellipsis overflow-hidden;
}
</style>
